<?php
/**
 * ^2_3^
 * PHP workman 多进程网络爬虫框架
 * 简单示例
 * // 执行demo_start.php脚本
 * $ php demo_start.php
 */

use Beanbun\Beanbun;

require_once('../vendor/autoload.php');

$beanbun = new Beanbun;
$beanbun->seed = [
    'http://www.baidu.com/',
];
$beanbun->afterDownloadPage = function($b) {
    file_put_contents(__DIR__.'/download4page/'.md5($b->url), $b->page);
};
$beanbun->start();